package com.mdlib.helper.model;

import com.google.gson.annotations.SerializedName;

/**
 * Created by bin on 16/7/26.
 */
public class BaseResult<T> {


    public int code;


    public String msg;


    public T data;

    public String errorData;


    @SerializedName("newpage")
    public int newPage;

    public BaseResult() {
    }

    public BaseResult(int code, String msg, String errorData) {
        this.code = code;
        this.msg = msg;
        this.errorData = errorData;
    }


    public BaseResult(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "code: " + code + ", msg: " + msg;
    }
}
